package com.aaa.exception;

import com.aaa.vo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author C-Q
 * @version 1.1.0
 * @Description: TODO
 * @date 2022/9/24
 */
//    @ControllerAdvice
 public class MyException {
    @ExceptionHandler(value = Exception.class)
    @ResponseBody
    public Result my(Exception e){
        Result result = new Result(500, e.getMessage());
        return result;
    }
}
